package com.lagou.stage02;

public class NetworkService extends ServiceAbstract implements NetworkServiceInterface{
    private double internet_traffic;
    private double monthly_charges;

    public NetworkService(double internet_traffic, double monthly_charges) {
        this.internet_traffic = internet_traffic;
        this.monthly_charges = monthly_charges;
    }

    public double getMonthlyCharges() {
        return monthly_charges;
    }

    public void setMonthlyCharges(double monthly_charges) {
        this.monthly_charges = monthly_charges;
    }

    @Override
    public void show() {
        System.out.println("当前上网套餐包含上网流量：" + internet_traffic + "GB，每月资费：" + monthly_charges + "元。");
    }

    @Override
    public void networkServiceAction(double internet_traffic, String type) {
        System.out.println("已经使用" + type + "上网，流量达到" + internet_traffic + "GB了。");
    }
}
